package core
{
	import model.LoaderPoolModel;
	import model.LoginModel;
	import model.NetDataParserModel;
	import model.PlayCardModel;
	import model.TaskModel;
	import model.TimerModel;
	import model.hall.HallModel;
	import model.net.NetRomote;
	import model.net.NetSocket;
	import model.play.PlayTestModel;
	import model.play.PlayerModel;
	import model.role.RoleModel;
	import model.room.FriendModel;
	import model.room.ItemModel;
	import model.room.MailModel;
	import model.room.TableModel;
	import model.sit.SitModel;
	import model.system.SystemModel;
	import model.system.TraceManager;

	public class Model
	{
		private static var instance:Model;
		
		public function Model()
		{
			if (instance)
			{
				throw Error("单列");
			}
		}
		
		public static function getInstance():Model
		{
			if (instance == null)instance = new Model();
			return instance;
		}
		
		//-------

		public var playTestModel:PlayTestModel;
		public var playCardModel:PlayCardModel;
		public var timerModel:TimerModel;
		public var sitModel:SitModel;
		
		public var netSocket:NetSocket;
		public var netRemote:NetRomote;
		
		
		public var loginModel:LoginModel;
		public var netDataParserModel:NetDataParserModel;
		public var tableModel:TableModel;
		public var roleModel:RoleModel;
		public var playerModel:PlayerModel;
		public var traceManager:TraceManager;
		public var systeModel:SystemModel;
		
		public var loaderPoolModel:LoaderPoolModel;
		public var hallModel:HallModel;
		public var mailModel:MailModel;
		public var friendModel:FriendModel;
		
		public var itemModel:ItemModel;
		public var taskModel:TaskModel;
		
		public function initModels():void
		{
			traceManager = TraceManager.getInstance();
			timerModel = TimerModel.getInstance();
			
			playCardModel = new PlayCardModel();
			sitModel = new SitModel();
			
			playTestModel = new PlayTestModel();
			
			netRemote = new NetRomote();
			loginModel = new LoginModel();
			netDataParserModel = NetDataParserModel.getInstance();
			tableModel = new TableModel();
			roleModel = new RoleModel();
			playerModel = new PlayerModel();
			systeModel = new SystemModel();
			loaderPoolModel = new LoaderPoolModel();
			hallModel = new HallModel();
			netSocket = NetSocket.getInstance();
			mailModel = new MailModel();
			friendModel = new FriendModel();
			
			itemModel = new ItemModel();
			taskModel = new TaskModel();
		}
	}
}